<?php 
$this->set("title_for_layout", $product_category['ProductCategory']['name']);

?>
<div class="content_above">
<div id="mcs3_container" class="main_content">
		<div class="customScrollBox">
			<div class="container">
				<div class="content">
					<h2 class="title"><a href="<?php echo $html->url(array('plugin' => 'products', 'controller' => 'products', 'action' => 'listproducts', $product_category['ProductCategory']['alias'])); ?>"><?php echo $product_category['ProductCategory']['name'] ?></a></h2>
					 <?php 
                     $cols = 3;
                     foreach($products as $key => $product): ?>
                     <?php
                     if($key % $cols == 0): ?>
                        <div class="products">
									<ul>
                     <?php endif; ?>
										<li>
                                        <a href="#product<?php echo $product['Product']['id'] ?>" class="fancybox" title="<?php echo $product['Product']['title']?>">
										<?php
										if($product['Product']['image'] != '')
                                                    echo $html->image('/files/products/'. $html->getThumbnailName($product['Product']['image']));
                                                else
                                                    echo $html->image('/files/products/no-picture.jpg');
                                                ?>        						
                        					</a>
                                            <span><?php echo $product['Product']['title']; ?></span>
                                            <br />
                                            <span><strong><?php echo $product['Product']['price']; ?></strong></span>
                                            <a class="order" href="<?php echo $html->url(array('plugin' => 'products','controller' => 'products','action' => 'add_cart',$product['Product']['alias']))  ;?>"><?php echo __('Mua hàng');?></a>
                                        <div class="product_fancybox" style="display: none;" id="product<?php echo $product['Product']['id'] ?>">
															<h1 class="title"><?php echo $product['Product']['title']; ?></h1>    
                                               
                                                <?php
											if($product['Product']['image'] != '')
                                                        echo $html->image('/files/products/'. $product['Product']['image']);
                                                    else
                                                        echo $html->image('/files/products/no-picture.jpg');
                                                    ?>   
																<?php echo $product['Product']['description']; ?>
																<div style="clear:left"></div>	
                                                <span class="price"><strong><?php __("Giá: "); ?><?php echo $product['Product']['price']; ?></strong></span>
																<a class="order" href="<?php echo $html->url(array('plugin' => 'products','controller' => 'products','action' => 'add_cart',$product['Product']['alias']))  ;?>"><?php echo __('Mua hàng');?></a>
                                            </div>
                                                                                
										</li>
                      <?php if($key % $cols == $cols -1):?>
                        </ul>
                        </div>
                     <?php endif; ?>
                     
                      <?php if($key % $cols != $cols -1 && $key == count($products)-1 ): ?>
                        </ul>
                        </div>
                     <?php endif; ?>                     
                     <?php endforeach; ?>			
							<div style="clear:both"></div>
							<?php echo $this->element('pagination/pagination', array('model' => 'Product'));?>
				</div>
				</div>
			</div>
		</div>

<div class="right_content">
	<h1 class="title"><?php echo __('Sản phẩm mới');?><h1>
	<div class="product-list">
	   <?php echo $this->element('new_products');?>
	</div>
</div>
</div>
<?php
echo $this->Html->script('jquery-ui.min.js', array('type' => 'text/javascript'));	
echo $this->Html->script('jquery.mousewheel.min.js', array('type' => 'text/javascript'));	
echo $this->Html->script('jquery.easing.1.3.js', array('type' => 'text/javascript'));	
echo $this->Html->script('news.js', array('type' => 'text/javascript'));
echo $this->Html->script('jquery.mCustomScrollbar.js', array('type' => 'text/javascript')); ?>